package com.xyzh.stj.web.dao;

import com.xyzh.stj.web.dto.right.QueryApplicationDTO;
import com.xyzh.stj.web.entity.ApplicationEntity;
import com.xyzh.stj.web.entity.RoleEntity;
import com.xyzh.application.base.dao.BasicMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author @JZB
 * @since 2023-11-24
 */
public interface ApplicationMapper extends BasicMapper<ApplicationEntity> {

    long getMaxSortkey();

    List<ApplicationEntity> getAppsByRoles(@Param("roles") List<RoleEntity> roles);

    List<ApplicationEntity> queryAppsByRoles(@Param("roles") List<RoleEntity> roles, @Param("query") QueryApplicationDTO query);

    List<ApplicationEntity> getAppsByRoleid(@Param("roleid") String roleid);

    List<ApplicationEntity> getAppsByOrgs(@Param("orgs") List<String> orgs);

    List<ApplicationEntity> queryAppsByOrgs(@Param("orgs") List<String> orgs, @Param("query") QueryApplicationDTO query);

    List<ApplicationEntity> getAppsByOrgid(@Param("orgid") String orgid);
}
